<?php slot('title') ?>
    <?php echo $portal->getTitle().' - '.$section->getTitle()?>
<?php end_slot() ?>
<?php if($portal->getImage()): ?>
    <?php slot('thumbnail')?>
    <link rel="image_src" type="image/jpeg"
          href="<?php echo url_for('@render_basehost',true).'uploads/portal_'.$portal->getId().'/images/'.$portal->getImage()?>" />
    <?php end_slot() ?>
<?php endif; ?>
<?php if($section->getUsesHeader()):?>
    <div id="header">
        <?php foreach ($headerObjects as $headerObject):?>
            <?php include_partial('render'.$headerObject->getType()->getType(),
                    array(
                        strtolower($headerObject->getType()->getType()) => $headerObject,
                        'portal' => $portal,
                        'hasBigScreen' => $hasBigScreen
                    )) ?>
        <?php endforeach;?>
    </div>
<?php endif;?>
<br>
<div id="mainContent">
    <?php if($section->getType()->getType() != 'Register'): ?>
        <?php if($section->getType()->getType() == 'News' && $section->getNewsSection()->getUsesExternalFeed()): ?>
            <?php include_partial('renderSectionNewsExternalFeed',
                    array(
                        'section'  => $section,
                        'portal'   => $portal,
                        'news'     => $news,
                        'page'     => $page,
                        'total_pages'     => $total_pages,
                        'have_to_paginate' => $have_to_paginate,
                        'has_prev' => $has_prev,
                        'has_next' => $has_next,
                        'elements' => $elements,
                        'hasBigScreen' => $hasBigScreen
                    )
            )?>
        <?php else: ?>
            <?php include_partial('renderSection'.$section->getType()->getType(),
                    array(
                        'section'  => $section,
                        'portal'   => $portal,
                        'pager'    => $pager,
                        'elements' => $elements,
                        'hasBigScreen' => $hasBigScreen
                    )
            )?>
        <?php endif; ?>
    <?php else: ?>
        <?php include_partial('renderSectionRegister',
                ($for_download ?
                    array(
                        'section' => $section,
                        'portal' => $portal,
                        'elements' => $elements,
                        'form' => $form,
                        'form_position' => $form_position,
                        'for_download' => $for_download,
                        'content'=> $content,
                        'hasBigScreen' => $hasBigScreen,
                        'for_user_autenthication' => (isset ($for_user_autenthication) ? $for_user_autenthication : false),
                        'server_problem' => (isset ($server_problem) ? $server_problem : false)
                    )
                    :
                    array(
                        'section'=> $section,
                        'portal' => $portal,
                        'elements' => $elements,
                        'form'=> $form,
                        'form_position' => $form_position,
                        'for_download' => $for_download,
                        'hasBigScreen' => $hasBigScreen,
                        'server_problem' => (isset ($server_problem) ? $server_problem : false)
                    )
                )
    )?>
    <?php endif; ?>
</div>
<br>
<?php if($section->getUsesFooter()):?>
    <div id="footer">
        <?php if($portal->getFooter()->getUsesBreadcrumb() && $section->getType()->getType() != 'Home'): ?>
            <?php include_partial('breadcrumbs', array('portal' => $portal, 'section' => $section, 'content' => null))?>
        <?php endif; ?>
        <?php for($i = 1; $i <= count($footerObjects); $i++):?>
            <?php include_partial('render'.$footerObjects[$i]->getType()->getType(),
                    array(
                        strtolower($footerObjects[$i]->getType()->getType()) => $footerObjects[$i],
                        'portal' => $portal,
                        'hasBigScreen' => $hasBigScreen
                    )) ?>
        <?php endfor;?>
        <p>
            <?php echo html_entity_decode($portal->getFooter()->getHtml())?>
        </p>
        <p class="copyrights">
            <a href="<?php echo url_for('render_homesection',$portal)?>">
                <b><?php echo $portal?></b>
            </a> es desarrollado por 
            <a href="http://www.equilibrio.net.ve">
                <b>Equilibrio Agencia Digital</b>
            </a>
        </p>
    </div>
<?php endif;?>

